package com.ease.platform.dispatcher.service.impl;

import com.ease.platform.authorization.service.impl.AbstractAuthorizationServiceImpl;
import com.ease.platform.dispatcher.support.ImplementationDispatcherCallback;
import com.ease.platform.dispatcher.support.ImplementationDispatcherFactory;

/**
 * 
 * @author nathanleewei
 * 
 * @param <T>
 */
public abstract class AbstractDispatcherProxyServiceImpl<T> extends AbstractAuthorizationServiceImpl {

	private ImplementationDispatcherFactory<T> implementationDispatcherFactory;

	protected T getImplementation(ImplementationDispatcherCallback implementationDispatcherCallback) {
		return implementationDispatcherFactory.getImplementation(implementationDispatcherCallback);
	}

	/**
	 * @return the implementationDispatcherFactory
	 */
	public ImplementationDispatcherFactory<T> getImplementationDispatcherFactory() {
		return implementationDispatcherFactory;
	}

	/**
	 * @param implementationDispatcherFactory
	 *            the implementationDispatcherFactory to set
	 */
	public void setImplementationDispatcherFactory(ImplementationDispatcherFactory<T> implementationDispatcherFactory) {
		this.implementationDispatcherFactory = implementationDispatcherFactory;
	}

}
